package cc.lj.internal.merchant.domain.brand.service.impl;

import cc.lj.internal.merchant.domain.brand.model.vo.MerchantBrandDO;
import cc.lj.internal.merchant.domain.brand.model.vo.convert.MerchantBrandPOConvertDO;
import cc.lj.internal.merchant.domain.brand.repository.IMerchantBrandRepository;
import cc.lj.internal.merchant.domain.brand.service.IMerchantBrandDomainService;
import cc.lj.internal.merchant.infrastructure.po.MerchantBrandPO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 商户品牌领域服务service实现类
 * @author liangxifeng
 * @date 2022-07-06
 */
@Service("merchantBrandDomainServiceImpl")
@Slf4j
public class MerchantBrandDomainServiceImpl implements IMerchantBrandDomainService {

    @Resource(name = "merchantBrandRespository")
    private IMerchantBrandRepository repository;

    @Override
    public MerchantBrandDO getById(Integer id) {
        MerchantBrandPO brandPO =  repository.getById(id);
        return MerchantBrandPOConvertDO.INSTANCE.convert(brandPO);
    }
}
